package com.tyanxie.asd.dao

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
import com.tyanxie.asd.model.SugarEntity

@Dao
interface SugarEntityDao {
    @Insert
    fun saveAll(vararg sugarEntities: SugarEntity)

    @Query("DELETE FROM sugar")
    fun truncate()

    @Query("SELECT * FROM sugar WHERE sugar_number_id = :sugarNumberId")
    fun listBySugarNumberId(sugarNumberId: Long): List<SugarEntity>
}